// 创建链接
var mongoose = require("mongoose");
mongoose.set("useCreateIndex",true);
mongoose.connect("mongodb://localhost/Report",{
    useNewUrlParser: true,
    useUnifiedTopology: true
})

mongoose.connection.on('open',function() {
    console.log('mongoDB链接已打开');
})